package com.ruiysoft.entity.mdse;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author liyahui
 * @since 2018-12-01
 */
@TableName("merchandise_spu")
public class MerchandiseSpu extends Model<MerchandiseSpu> {

    private static final long serialVersionUID = 1L;

    /**
     * 商品spuID
     */
    @TableId(value = "spu_id", type = IdType.AUTO)
    private Long spuId;

    /**
     * 商品spu编码
     */
    @TableField("spu_no")
    private String spuNo;

    /**
     * 商品名称
     */
    @TableField("merchandise_name")
    private String merchandiseName;

    /**
     * 计量单位(个件箱)
     */
    @TableField("measurement_unit")
    private String measurementUnit;

    /**
     * 包装单位
     */
    @TableField("packing_unit")
    private String packingUnit;

    /**
     * 换算关系（一包装单位等于多少计量单位 如1：10 填10）
     */
    private Integer conversion;

    /**
     * 商品类型（1，普通商品，2，虚拟商品（不需要收货地址））
     */
    private Integer type;

    /**
     * 上下架状态(UP(1, "上架"), DOWN(2, "下架");)
     */
    private Integer status;

    /**
     * 分类ID
     */
    @TableField("main_category")
    private Long mainCategory;

    /**
     * 商户ID
     */
    @TableField("shop_id")
    private Long shopId;

    /**
     * 商品详情
     */
    private String info;

    /**
     * 物流模版ID
     */
    @TableField("freight_template_id")
    private Integer freightTemplateId;

    private Long creator;

    @TableField("create_time")
    private Date createTime;

    private Long updator;

    @TableField("update_time")
    private Date updateTime;

    private Integer version;

    @TableField("del_flag")
    private Integer delFlag;

    @TableField(exist = false)
    String spuPicture;

    @TableField(exist = false)
    Integer sequence;

    // 供应商编号
    @TableField("supplier_code")
    String supplierCode;

    @TableField(exist = false)
    String freightName;

    @TableField(exist = false)
    String categoryName;

    @TableField(exist = false)
    String supplierName;

    public Long getSpuId() {
        return spuId;
    }

    public MerchandiseSpu setSpuId(Long spuId) {
        this.spuId = spuId;
        return this;
    }
    public String getSpuNo() {
        return spuNo;
    }

    public MerchandiseSpu setSpuNo(String spuNo) {
        this.spuNo = spuNo;
        return this;
    }
    public String getMerchandiseName() {
        return merchandiseName;
    }

    public MerchandiseSpu setMerchandiseName(String merchandiseName) {
        this.merchandiseName = merchandiseName;
        return this;
    }
    public String getMeasurementUnit() {
        return measurementUnit;
    }

    public MerchandiseSpu setMeasurementUnit(String measurementUnit) {
        this.measurementUnit = measurementUnit;
        return this;
    }
    public String getPackingUnit() {
        return packingUnit;
    }

    public MerchandiseSpu setPackingUnit(String packingUnit) {
        this.packingUnit = packingUnit;
        return this;
    }
    public Integer getConversion() {
        return conversion;
    }

    public MerchandiseSpu setConversion(Integer conversion) {
        this.conversion = conversion;
        return this;
    }
    public Integer getType() {
        return type;
    }

    public MerchandiseSpu setType(Integer type) {
        this.type = type;
        return this;
    }
    public Integer getStatus() {
        return status;
    }

    public MerchandiseSpu setStatus(Integer status) {
        this.status = status;
        return this;
    }
    public Long getMainCategory() {
        return mainCategory;
    }

    public MerchandiseSpu setMainCategory(Long mainCategory) {
        this.mainCategory = mainCategory;
        return this;
    }
    public Long getShopId() {
        return shopId;
    }

    public MerchandiseSpu setShopId(Long shopId) {
        this.shopId = shopId;
        return this;
    }
    public String getInfo() {
        return info;
    }

    public MerchandiseSpu setInfo(String info) {
        this.info = info;
        return this;
    }
    public Integer getFreightTemplateId() {
        return freightTemplateId;
    }

    public MerchandiseSpu setFreightTemplateId(Integer freightTemplateId) {
        this.freightTemplateId = freightTemplateId;
        return this;
    }
    public Long getCreator() {
        return creator;
    }

    public MerchandiseSpu setCreator(Long creator) {
        this.creator = creator;
        return this;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public MerchandiseSpu setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public Long getUpdator() {
        return updator;
    }

    public MerchandiseSpu setUpdator(Long updator) {
        this.updator = updator;
        return this;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public MerchandiseSpu setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }
    public Integer getVersion() {
        return version;
    }

    public MerchandiseSpu setVersion(Integer version) {
        this.version = version;
        return this;
    }
    public Integer getDelFlag() {
        return delFlag;
    }

    public MerchandiseSpu setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.spuId;
    }

    @Override
    public String toString() {
        return "MerchandiseSpu{" +
        "spuId=" + spuId +
        ", spuNo=" + spuNo +
        ", merchandiseName=" + merchandiseName +
        ", measurementUnit=" + measurementUnit +
        ", packingUnit=" + packingUnit +
        ", conversion=" + conversion +
        ", type=" + type +
        ", status=" + status +
        ", mainCategory=" + mainCategory +
        ", shopId=" + shopId +
        ", info=" + info +
        ", freightTemplateId=" + freightTemplateId +
        ", creator=" + creator +
        ", createTime=" + createTime +
        ", updator=" + updator +
        ", updateTime=" + updateTime +
        ", version=" + version +
        ", delFlag=" + delFlag +
        "}";
    }

    public String getSpuPicture() {
        return spuPicture;
    }

    public void setSpuPicture(String spuPicture) {
        this.spuPicture = spuPicture;
    }

    public Integer getSequence() {
        return sequence;
    }

    public void setSequence(Integer sequence) {
        this.sequence = sequence;
    }

    public String getSupplierCode() {
        return supplierCode;
    }

    public void setSupplierCode(String supplierCode) {
        this.supplierCode = supplierCode;
    }

    public String getFreightName() {
        return freightName;
    }

    public void setFreightName(String freightName) {
        this.freightName = freightName;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }
}
